package hzau.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import hzau.pojo.requestParams.CourseRegisterParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Course implements Serializable {
    @TableId(type= IdType.AUTO)
    Long id;
    String name;
    Integer term;
//    Integer startYear;
    Long collegeId;
    Byte expired;
    Long createPaperId;
    Long reviewPaperId;
    public Course(CourseRegisterParam courseRegisterParam){
        this.name=courseRegisterParam.getName();
        this.term=courseRegisterParam.getTerm();
//        this.startYear=courseRegisterParam.getStartYear();
        this.collegeId=courseRegisterParam.getCollegeId();
        this.reviewPaperId=courseRegisterParam.getReviewPaperId();
        this.createPaperId=courseRegisterParam.getCreatePaperId();
    }
}
